<include file="__THEME__/header" />
<script>

function check(){
  var nochange = false;

  <php>foreach( $item as $value ){</php>
    var old_{$value['name']}         = "{$info[$value['name']]}";
    var old_privacy_{$value['name']} = "{$privacy[$value['name']]}";
    var old_display_{$value['name']} = "{$display[$value['name']]}";
  <php>}</php>

  <php>foreach( $item as $value ){</php>
    if( $( "#old_{$value['name']}" ).val() == old_{$value['name']} &&  $( "#old_privacy_{$value['name']}" ).val()  == old_privacy_{$value['name']} &&  $( "#old_display_{$value['name']}" ).attr( 'checked' )  == old_display_{$value['name']} )
  <php>}</php>
    nochange = true;
    if( nochange ){
      Alert( "没有修改任何值" );
      return false;
    }else{
      return true;
    }
}


</script>
<link href="../Public/basic.css" rel="stylesheet" type="text/css" />

<div class="content"><!-- 内容 begin  -->

    <include file="__THEME__/apps" />


    <div class="main"> <!-- 右侧内容 begin  -->
        <div class=page_title> <!-- page_title begin -->
            <h2><img src="../Public/images/contacts.gif" />修改资料</h2>
        <div class="c"></div>
</div><!-- page_title end -->
        <div class="tab-menu"><!-- 切换标签 begin  -->
            <ul>
                <li><a href="__URL__"><span>基本资料</span></a></li>
                <li><a href="__URL__/intro"><span>个人情况</span></a></li>
                <li><a href="__URL__/contact" class="on"><span>联系方式</span></a></li>
                <li><a href="__URL__/education"><span>教育情况</span></a></li>
                <li><a href="__URL__/career"><span>工作情况</span></a></li>
                <li><a href="__URL__/face"><span>上传头像</span></a></li>
            </ul>
        </div><!-- 切换标签 end  -->


        <div class="data"><!-- 联系方式 begin  -->
        <php>if($_GET["t"] == 1){</php><center><b><font color="red">修改成功！</font></b></center> <php>}</php>
            <ul>
                <li class="btmline mb10 cGray2"><div class="left alR" style="width: 15%;">&nbsp;</div><div class="left" style="width: 50%;">&nbsp;</div><div class="left" style="width: 20%;">谁可以看见</div><div class="left" style="width: 15%;">在首页显示</div></li>
                   <form action="__URL__/doContact" method="post" class="form_validator" onsubmit="return check()">
                <volist name="item" id="vo">
                    <li>
                        <div class="left alR" style="width: 15%;">{$vo.display}：</div><div class="left" style="width: 50%;">
                          <input type="text" id="old_{$vo['name']}" class="TextH20" style="width:300px;" onfocus="this.className='Text2'" onblur="this.className='TextH20'"  name="{$vo.name}" value="<php>echo $info[$vo['name']];</php>"/>
                       </div>
                        <div class="left" style="width: 20%;">
                          <select id="old_privacy_{$vo.name}"name="__privacy_{$vo.name}">
                                <option value="0"  <php>if($privacy[$vo["name"]] == 0){</php> selected='true' <php>}</php>>任何人</option>
                                <option value="1"  <php>if($privacy[$vo["name"]] == 1){</php> selected='true' <php>}</php>>仅好友</option>
                                <option value="2"  <php>if($privacy[$vo["name"]] == 2){</php> selected='true' <php>}</php>>私密</option>
                                谁可以看见
                            </select>
                        </div>
                        <div class="left" style="width: 15%;">
                          <input id="old_display_{$vo.name}"name="__display_{$vo.name}" type="checkbox" value="1" <php>if($display[$vo["name"]] == 1){</php> checked="true" <php>}</php>/>
                        </div>
                    </li>
                </volist>

                <li>
                    <div class="left alR" style="width: 15%;">&nbsp;</div><div class="left" style="width: 50%;"><input type="submit" class="btn_b" value="保存修改" />
                    </div>
                <div class="left" style="width: 20%;">&nbsp;</div><div class="left" style="width: 15%;">&nbsp;</div></li>
                </form>
            </ul>
        </div><!-- 联系方式 end  -->




    </div><!-- 右侧内容 end  -->
<div class="c"></div>
</div><!-- 内容 end -->
<include file="__THEME__/footer" />
